package com.app.micaihu.view.army.dialog

import android.os.Bundle
import com.app.base.BaseDialogFragment
import com.app.micaihu.R
import com.app.micaihu.configure.Config
import kotlinx.android.synthetic.main.army_task_dialog.*

/**
 * 出操
 */
class ArmyTaskDialog : BaseDialogFragment() {
    override fun getLayoutId() = R.layout.army_task_dialog

    var joinDays = 0
    var gold = 0
    var desc = ""
    override fun getBundle(bundle: Bundle) {
        super.getBundle(bundle)
        joinDays = bundle.getInt(Config.Extra.joinDays, 0)
        gold = bundle.getInt(Config.Extra.gold, 0)
        desc = bundle.getString(Config.Extra.desc, "")
    }

    override fun setData() {
        tvSignDay.text = joinDays.toString()
        tvGold.text = "贡献值 + ${gold}"
        tvDescription.text = desc
    }

    override fun addListeners() {
        btnOk.setOnClickListener { dismiss() }
    }
}